dragImage
Type
property
Summary
Reports the id of an image that should be used to represent the drag operation.
Syntax
set the dragImage to {empty | <imageID> }
get the dragImage
Description
The dragImage property specifies the id of an image used to represent a drag operation. The property is set by the source application in a dragStart handler.
The image is only looked up after completion of the dragStart handler in which it is set and so the image must persist for the lifetime of the operation. Typically, a control will want to use a pre-existing image object, or create a temporary object in dragStart that it deletes when it receives dragEnd.
LiveCode looks for the specified image in the following order:
- The stack of the current object's behavior (if applicable)
- The stack of the owner of the current object's behavior (if applicable) ...
- The stack of the current object's stack's behavior (if applicable)
- The current object's stack
- The current object's stack's mainstack (if a substack)
- The current object's stack's mainstacks substacks
- The list of open stacks, in order they were loaded
Examples
on dragStart
set the dragImage to the id of image "Drag Image" of me
end dragStart
Related
property: behavior, dragImageOffset
Compatibility and Support
Introduced
LiveCode 2.9
OS
mac
windows
Platforms
desktop
server